import Vue from 'vue'
import Router from 'vue-router'

// login & home
import login from '@/components/login'
import home from '@/components/home'

// page
import index from '@/components/page/index'
import scenicList from '@/components/page/scenicList'
import about from '@/components/page/about'

// poetryDetial
import poetryDetial from '@/components/page/poetryDetial'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [
        {path: 'index', name: 'index', component: index},
        {path: 'scenicList', name: 'scenicList', component: scenicList},
        {path: 'about', name: 'about', component: about}
      ]
    },
    {
      path: '/poetryDetial',
      name: 'poetryDetial',
      component: poetryDetial
    }
  ]
})
